package cn.buddha.jec;

import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.config.server.EnableConfigServer;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ClassName ConfigServerApp
 * @Author 友野浩二
 * @Date 2019/11/10 13:41
 * @Description 分布式配置管理中心
 * @Version 1.0
 *
 * <pre>
 *     @EnableConfigServer : 声明是Config Server
 * </pre>
 */
@SpringBootApplication
@EnableConfigServer
@EnableDiscoveryClient
@RestController
@Slf4j
public class ConfigServerApp {

    public static void main(String[] args) {
        SpringApplication.run(ConfigServerApp.class, args);
        log.info("<<<<======== Tong Config Server Started ========>>>>");
    }

    @RequestMapping(value = "/", method = RequestMethod.GET)
    public String home() {
        return "Tong Config Server!";
    }

}
